package com.starlink.model.util;

import com.starlink.model.dtomapper.StarPaintRegisterDtoMapper;
import com.starlink.model.domain.StarPaintRegisterDO;
import com.starlink.model.vo.StarPaintRegisterVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class StarPaintRegisterConvert {

    public static List<StarPaintRegisterVO> buildStarPaintRegisterVoList(List<StarPaintRegisterDO> starPaintRegisterDOList) {
        if (CollectionUtils.isEmpty(starPaintRegisterDOList)) {
            return Lists.newArrayList();
        }
        List<StarPaintRegisterVO> starPaintRegisterVOList = new ArrayList<>();
        for (StarPaintRegisterDO starPaintRegisterDO : starPaintRegisterDOList) {
            starPaintRegisterVOList.add(StarPaintRegisterDtoMapper.INSTANCE.do2VO(starPaintRegisterDO));
        }

        return starPaintRegisterVOList;
    }
}
